//
//  BLStyleTwoTableViewCell.m
//  家校互通
//
//  Created by 李赛 on 15/5/21.
//  Copyright (c) 2015年 姬鑫宇. All rights reserved.
//

#import "BLStyleTwoTableViewCell.h"
//只有文字
@implementation BLStyleTwoTableViewCell

- (void)awakeFromNib {
    // Initialization code
    

    _btnRead.layer.masksToBounds=YES;
    _btnRead.layer.borderWidth=0.3;
    _btnRead.layer.borderColor=[COLOR(233, 233, 233) CGColor];
    _btnForQuetion.layer.masksToBounds=YES;
    _btnForQuetion.layer.borderWidth=0.3;
    _btnForQuetion.layer.borderColor=[COLOR(233, 233, 233) CGColor];
}

- (void)setContentOfBlackBoard:(BlackBoardModel *)model{
    _lbDetailInfo.text = model.content;
    _lbSendUser.text = model.create_time;
    
    [_btnRead setTitle:[NSString stringWithFormat:@"已读 %ld",(long)model.read_count] forState:UIControlStateNormal];
    [_btnForQuetion setTitle:[NSString stringWithFormat:@"提问 %ld",(long)model.comment_count] forState:UIControlStateNormal];
    
    NSString *placeImgStr = nil;
    switch (model.type) {
        case kBlackBoardCommend:
            placeImgStr = @"表彰1";
            break;
        case kBlackBoardNews:
            placeImgStr = @"公告";
            break;
        case kBlackBoardNotice:
            placeImgStr = @"通知";
            break;
        case kBlackBoardPay:
            placeImgStr = @"收费";
            break;
        default:
            placeImgStr = @"公告";
            break;
    }
    
    [_imgForMsgType setImage:[UIImage imageNamed:placeImgStr]];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
